﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_Controls_CategoryListControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            DataList1.DataSource = DataAccess.getCategories();
            DataList1.DataBind();
        }
    }
    protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        String url = "";
        url = "Default.aspx?subCate=" + DataList1.SelectedItem;
        Response.Redirect(url);
    }
}